package com.stars.Test.controller;

import com.stars.base.entity.Result;
import com.stars.util.common.DevelopKit;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashSet;
import java.util.Set;

/**
 * @author : Rocks
 * @version : 1.0
 * @date : 2022/11/19 18:58
 * @description : 通用方法测试
 */
@RestController
@RequestMapping("/test/common")
public class TestCommonController {

    @RequestMapping("/generateUUID")
    public Result generateUUID(int count){
        count = count==0?5:count;
        Set<String> set = new HashSet<>();
        for(int i = 0;i<count;i++){
            set.add(DevelopKit.generateUUID());
        }
        return Result.success(set);
    }

}
